pub const BSL_UIO_FILE_READ: u32 = 2;
pub const BSL_UIO_FILE_WRITE: u32 = 4;
pub const BSL_UIO_FILE_APPEND: u32 = 8;
pub const BSL_UIO_FILE_TEXT: u32 = 16;
pub const BSL_UIO_FLAGS_READ: u32 = 1;
pub const BSL_UIO_FLAGS_WRITE: u32 = 2;
pub const BSL_UIO_FLAGS_IO_SPECIAL: u32 = 4;
pub const BSL_UIO_FLAGS_RWS: u32 = 7;
pub const BSL_UIO_FLAGS_SHOULD_RETRY: u32 = 8;
pub const BSL_UIO_FLAGS_MEM_READ_ONLY: u32 = 16;
pub const BSL_UIO_FLAGS_BASE64_NO_NEWLINE: u32 = 32;
pub const BSL_UIO_FLAGS_BASE64_PEM: u32 = 64;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct UIO_ControlBlock {
    _unused: [u8; 0],
}
pub type BSL_UIO = UIO_ControlBlock;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BSL_UIO_BufMem {
    pub length: usize,
    pub data: *mut ::std::os::raw::c_char,
    pub max: usize,
}
pub type BslUioWriteCb = ::std::option::Option<
    unsafe extern "C" fn(
        uio: *mut BSL_UIO,
        buf: *const ::std::os::raw::c_void,
        len: u32,
        writeLen: *mut u32,
    ) -> i32,
>;
pub type BslUioReadCb = ::std::option::Option<
    unsafe extern "C" fn(
        uio: *mut BSL_UIO,
        buf: *mut ::std::os::raw::c_void,
        len: u32,
        readLen: *mut u32,
    ) -> i32,
>;
pub type BslUioCtrlCb = ::std::option::Option<
    unsafe extern "C" fn(
        uio: *mut BSL_UIO,
        cmd: i32,
        larg: i32,
        parg: *mut ::std::os::raw::c_void,
    ) -> i32,
>;
pub type BslUioCreateCb = ::std::option::Option<unsafe extern "C" fn(uio: *mut BSL_UIO) -> i32>;
pub type BslUioDestroyCb = ::std::option::Option<unsafe extern "C" fn(uio: *mut BSL_UIO) -> i32>;
pub type BslUioPutsCb = ::std::option::Option<
    unsafe extern "C" fn(
        uio: *mut BSL_UIO,
        buf: *const ::std::os::raw::c_char,
        writeLen: *mut u32,
    ) -> i32,
>;
pub type BslUioGetsCb = ::std::option::Option<
    unsafe extern "C" fn(
        uio: *mut BSL_UIO,
        buf: *mut ::std::os::raw::c_char,
        readLen: *mut u32,
    ) -> i32,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BSL_UIO_MethodStruct {
    _unused: [u8; 0],
}
pub type BSL_UIO_Method = BSL_UIO_MethodStruct;
pub type BSL_UIO_USERDATA_FREE_FUNC =
    ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
pub const BSL_UIO_TCP: BSL_UIO_TransportType = 0;
pub const BSL_UIO_UDP: BSL_UIO_TransportType = 1;
pub const BSL_UIO_SCTP: BSL_UIO_TransportType = 2;
pub const BSL_UIO_MEM: BSL_UIO_TransportType = 3;
pub const BSL_UIO_FILE: BSL_UIO_TransportType = 4;
pub const BSL_UIO_BUFFER: BSL_UIO_TransportType = 5;
pub const BSL_UIO_UNKNOWN: BSL_UIO_TransportType = 6;
pub const BSL_UIO_EXTEND: BSL_UIO_TransportType = 10000;
pub type BSL_UIO_TransportType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BSL_UIO_SctpAuthKey {
    pub shareKeyId: u16,
    pub authKeySize: u16,
    pub authKey: *const u8,
}
pub const BSL_UIO_GET_INIT: BSL_UIO_CtrlParameter = 0;
pub const BSL_UIO_GET_WRITE_NUM: BSL_UIO_CtrlParameter = 1;
pub const BSL_UIO_GET_READ_NUM: BSL_UIO_CtrlParameter = 2;
pub const BSL_UIO_SET_PEER_IP_ADDR: BSL_UIO_CtrlParameter = 256;
pub const BSL_UIO_GET_PEER_IP_ADDR: BSL_UIO_CtrlParameter = 257;
pub const BSL_UIO_SET_FD: BSL_UIO_CtrlParameter = 258;
pub const BSL_UIO_GET_FD: BSL_UIO_CtrlParameter = 259;
pub const BSL_UIO_FLUSH: BSL_UIO_CtrlParameter = 260;
pub const BSL_UIO_RESET: BSL_UIO_CtrlParameter = 261;
pub const BSL_UIO_PENDING: BSL_UIO_CtrlParameter = 262;
pub const BSL_UIO_WPENDING: BSL_UIO_CtrlParameter = 263;
pub const BSL_UIO_SET_BUFFER_SIZE: BSL_UIO_CtrlParameter = 264;
pub const BSL_UIO_UDP_SET_CONNECTED: BSL_UIO_CtrlParameter = 512;
pub const BSL_UIO_UDP_GET_MTU_OVERHEAD: BSL_UIO_CtrlParameter = 513;
pub const BSL_UIO_UDP_QUERY_MTU: BSL_UIO_CtrlParameter = 514;
pub const BSL_UIO_UDP_MTU_EXCEEDED: BSL_UIO_CtrlParameter = 515;
pub const BSL_UIO_SCTP_CHECK_PEER_AUTH: BSL_UIO_CtrlParameter = 768;
pub const BSL_UIO_SCTP_ADD_AUTH_SHARED_KEY: BSL_UIO_CtrlParameter = 769;
pub const BSL_UIO_SCTP_ACTIVE_AUTH_SHARED_KEY: BSL_UIO_CtrlParameter = 770;
pub const BSL_UIO_SCTP_DEL_PRE_AUTH_SHARED_KEY: BSL_UIO_CtrlParameter = 771;
pub const BSL_UIO_SCTP_SND_BUFF_IS_EMPTY: BSL_UIO_CtrlParameter = 772;
pub const BSL_UIO_SCTP_GET_SEND_STREAM_ID: BSL_UIO_CtrlParameter = 773;
pub const BSL_UIO_SCTP_SET_APP_STREAM_ID: BSL_UIO_CtrlParameter = 774;
pub const BSL_UIO_SCTP_MASK_APP_MESSAGE: BSL_UIO_CtrlParameter = 775;
pub const BSL_UIO_SCTP_SET_CALLBACK: BSL_UIO_CtrlParameter = 776;
pub const BSL_UIO_MEM_NEW_BUF: BSL_UIO_CtrlParameter = 1024;
pub const BSL_UIO_MEM_GET_PTR: BSL_UIO_CtrlParameter = 1025;
pub const BSL_UIO_MEM_SET_EOF: BSL_UIO_CtrlParameter = 1026;
pub const BSL_UIO_MEM_GET_EOF: BSL_UIO_CtrlParameter = 1027;
pub const BSL_UIO_MEM_GET_INFO: BSL_UIO_CtrlParameter = 1028;
pub const BSL_UIO_FILE_OPEN: BSL_UIO_CtrlParameter = 1280;
pub const BSL_UIO_FILE_PTR: BSL_UIO_CtrlParameter = 1281;
pub const BSL_UIO_FILE_GET_EOF: BSL_UIO_CtrlParameter = 1282;
pub type BSL_UIO_CtrlParameter = ::std::os::raw::c_uint;
pub const BSL_UIO_CREATE_CB: BSL_UIO_METHOD_TYPE = 0;
pub const BSL_UIO_DESTROY_CB: BSL_UIO_METHOD_TYPE = 1;
pub const BSL_UIO_WRITE_CB: BSL_UIO_METHOD_TYPE = 2;
pub const BSL_UIO_READ_CB: BSL_UIO_METHOD_TYPE = 3;
pub const BSL_UIO_CTRL_CB: BSL_UIO_METHOD_TYPE = 4;
pub const BSL_UIO_PUTS_CB: BSL_UIO_METHOD_TYPE = 5;
pub const BSL_UIO_GETS_CB: BSL_UIO_METHOD_TYPE = 6;
pub type BSL_UIO_METHOD_TYPE = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BSL_UIO_CtrlGetPeerIpAddrParam {
    pub addr: *mut u8,
    pub size: u32,
}
unsafe extern "C" {
    pub fn BSL_UIO_NewMethod() -> *mut BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetMethodType(meth: *mut BSL_UIO_Method, type_: i32) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetMethod(
        meth: *mut BSL_UIO_Method,
        type_: i32,
        func: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_FreeMethod(meth: *mut BSL_UIO_Method);
}
unsafe extern "C" {
    pub fn BSL_UIO_MemMethod() -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_FileMethod() -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_SctpMethod() -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_TcpMethod() -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_UdpMethod() -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_BufferMethod() -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_New(method: *const BSL_UIO_Method) -> *mut BSL_UIO;
}
unsafe extern "C" {
    pub fn BSL_UIO_Free(uio: *mut BSL_UIO);
}
unsafe extern "C" {
    pub fn BSL_UIO_Write(
        uio: *mut BSL_UIO,
        data: *const ::std::os::raw::c_void,
        len: u32,
        writeLen: *mut u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_Read(
        uio: *mut BSL_UIO,
        data: *mut ::std::os::raw::c_void,
        len: u32,
        readLen: *mut u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_Ctrl(
        uio: *mut BSL_UIO,
        cmd: i32,
        larg: i32,
        parg: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_Puts(
        uio: *mut BSL_UIO,
        buf: *const ::std::os::raw::c_char,
        writeLen: *mut u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_Gets(
        uio: *mut BSL_UIO,
        buf: *mut ::std::os::raw::c_char,
        readLen: *mut u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetInit(uio: *mut BSL_UIO, init: bool);
}
unsafe extern "C" {
    pub fn BSL_UIO_GetTransportType(uio: *const BSL_UIO) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_GetUioChainTransportType(
        uio: *mut BSL_UIO,
        uioType: BSL_UIO_TransportType,
    ) -> bool;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetUserData(uio: *mut BSL_UIO, data: *mut ::std::os::raw::c_void) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetUserDataFreeFunc(
        uio: *mut BSL_UIO,
        userDataFreeFunc: BSL_UIO_USERDATA_FREE_FUNC,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_GetUserData(uio: *const BSL_UIO) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_UIO_GetIsUnderlyingClosedByUio(uio: *const BSL_UIO) -> bool;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetIsUnderlyingClosedByUio(uio: *mut BSL_UIO, close: bool);
}
unsafe extern "C" {
    pub fn BSL_UIO_GetMethod(uio: *const BSL_UIO) -> *const BSL_UIO_Method;
}
unsafe extern "C" {
    pub fn BSL_UIO_GetCtx(uio: *const BSL_UIO) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_UIO_SetCtx(uio: *mut BSL_UIO, ctx: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    pub fn BSL_UIO_SetFD(uio: *mut BSL_UIO, fd: ::std::os::raw::c_int);
}
unsafe extern "C" {
    pub fn BSL_UIO_SetFlags(uio: *mut BSL_UIO, flags: u32) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_ClearFlags(uio: *mut BSL_UIO, flags: u32) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_TestFlags(uio: *const BSL_UIO, flags: u32, out: *mut u32) -> u32;
}
unsafe extern "C" {
    pub fn BSL_UIO_UpRef(uio: *mut BSL_UIO) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_Append(uio: *mut BSL_UIO, tail: *mut BSL_UIO) -> i32;
}
unsafe extern "C" {
    pub fn BSL_UIO_PopCurrent(uio: *mut BSL_UIO) -> *mut BSL_UIO;
}
unsafe extern "C" {
    pub fn BSL_UIO_FreeChain(uio: *mut BSL_UIO);
}
unsafe extern "C" {
    pub fn BSL_UIO_Next(uio: *mut BSL_UIO) -> *mut BSL_UIO;
}
